import request from '@/utils/request'

// 查询商机列表
export function costList(query) {
  return request({
    url: '/product_recipe/list',
    method: 'get',
    params: query
  })
}
//详情
export function costListDetail(id) {
  return request({
    url: '/product_recipe/details/'+id,
    method: 'get',
  })
}
//新建配方
export function productRecipeAddInfo(data) {
  return request({
    url: '/product_recipe/addInfo',
    method: 'put',
    data: data
  })
}
//编辑
export function productRecipeEditInfo(data) {
  return request({
    url: '/product_recipe/editInfo',
   method: 'put',
   data: data
  })
}
//查看历史记录
export function listDataStatistics(query) {
  return request({
    url: '/product_recipe_history/listDataStatistics',
    method: 'get',
    params: query
  })
}
//原料列表
export function rawList(query) {
  return request({
    url: '/raw_material_price/list',
    method: 'get',
    params: query
  })
}
//新增原材料
export function addRawPrice(data) {
  return request({
    url: '/raw_material_price',
    method: 'post',
    data: data
  })
}
//更新价格
export function updataRawPrice(data) {
  return request({
    url: '/raw_material_price',
    method: 'put',
    data: data
  })
}
//查看历史记录
export function historyList(query) {
  return request({
    url: '/rawmaterial_price_history/listData',
    method: 'get',
    params: query
  })
}
//审核-列表
export function auditList(query) {
  return request({
    url: '/raw_material_price/auditList',
    method: 'get',
    params: query
  })
}
//审核原材料列表
export function auditRecrodList(query) {
  return request({
    url: '/raw_material_price/auditRecrodList',
    method: 'get',
    params: query
  })
}
// 提交审核
export function updateAuditRecrodStatus(data) {
  return request({
    url: '/raw_material_price/updateAuditRecrodStatus',
    method: 'put',
    data: data
  })
}
//审核详情
export function auditDetails(id) {
  return request({
    url: '/raw_material_price/auditDetails/'+id,
    method: 'get'
  })
}






